*** REPLICATION FILE FOR HOLTERMANN (2019) BLINDING THE ELEPHANT ***

*** Table 1
est clear
*1. only events
 eststo: nbreg maoosvevent3 l1stateattack2   l1maoattack l1clash2   ib1.maocontordnew cfire     spaall xconstdum rebtroops_d secforcedis i.distnum , nolog irr  vce(cluster dist)
*2. add maolossprop
  eststo: nbreg maoosvevent3 l1stateattack2   l1maoattack l1clash2 l1maolossproptot  ib1.maocontordnew cfire     spaall xconstdum rebtroops_d secforcedis i.distnum , nolog irr vce(cluster dist)
*3. add maoloss and maovic
 eststo: nbreg maoosvevent3 l1stateattack2   l1maoattack l1clash2 l1maoloss l1maovic  ib1.maocontordnew cfire     spaall xconstdum rebtroops_d secforcedis i.distnum , nolog irr vce(cluster dist)
*4. DV: maoosveventnoninfo3
 eststo: nbreg maoosveventnoninfo3 l1stateattack2  l1maoattack l1clash2    ib1.maocontordnew  cfire spaall xconstdum rebtroops_d secforcedis  i.distnum, nolog irr  vce(cluster dist) 
*5. DV: maoosveventinfo3
eststo:  nbreg maoosveventinfo3 l1stateattack2  l1maoattack l1clash2     ib1.maocontordnew  cfire spaall xconstdum rebtroops_d secforcedis i.distnum , nolog irr  vce(cluster dist)
*6. DV: maoosveventinfo3 + interactions 
eststo: nbreg maoosveventinfo3 c.l1stateattack2##ib1.maocontordnew c.l1stateattack2#c.urban  l1maoattack l1clash2   cfire    spaall  xconstdum rebtroops_d secforcedis i.distnum , nolog irr  vce(cluster dist)
esttab, eform se star(* 0.05 ** 0.01 *** 0.001)  label replace modelwidth(7) scalars(N_g)  order( )    drop(*distnum*)     


*** Figure 3
nbreg maoosveventinfo3 c.l1stateattack2##ib1.maocontordnew c.l1stateattack2#c.urban  l1maoattack l1clash2   cfire    spaall  xconstdum rebtroops_d secforcedis i.distnum , nolog irr  vce(cluster dist)
*control
margins ,  predict(n)  at(l1stateattack2=(0 (1) 2)   maocontordnew=(0 1 2)       (asobserved)  urban    l1maoattack l1clash2  cfire spaall xconstdum rebtroops_d secforcedis  dist ) 
marginsplot,   title("") ytitle("") legend(order(1 "Government control" 2 "Contested" 3 "Rebel control") symxsize(huge))  scale(1.3)
*urban
margins ,  predict(n)  at(l1stateattack2=(0 (1) 2)   urban=(0 25 50)       (asobserved)    maocontordnew  l1maoattack l1clash2  cfire spaall  xconstdum rebtroops_d secforcedis  dist ) 
marginsplot,   title("") ytitle("") legend(order(1 "Urban (%) = 0" 2 "Urban (%) = 25" 3 "Urban (%) = 50") symxsize(huge)) scale(1.3)



*** Online Appendix tables *** 
*Appendix, table 2
est clear
*same, xtpoisson fe
 eststo: xtpoisson maoosvevent3 l1stateattack2   l1maoattack l1clash2   ib1.maocontordnew cfire     spaall xconstdum rebtroops_d secforcedis  , nolog irr fe robust
est store _m2
*same, zinb
eststo: zinb maoosvevent3 l1stateattack2   l1maoattack l1clash2   ib1.maocontordnew cfire     spaall xconstdum rebtroops_d secforcedis i.distnum , inflate(anyevents6m) irr  vce(cluster dist) difficult nolog
est store _m3
*include stateosv 
eststo: nbreg maoosvevent3 l1stateattack2   l1maoattack l1clash2  l1stateosvevent3  ib1.maocontordnew  cfire     spaall xconstdum rebtroops_d secforcedis i.distnum  , nolog irr  vce(cluster dist)
est store _m4
*year dummies
eststo: nbreg maoosvevent3 l1stateattack2   l1maoattack l1clash2    ib1.maocontordnew  cfire     spaall xconstdum rebtroops_d secforcedis i.year i.distnum , nolog irr  vce(cluster dist)
est store _m5
*add  l1maoosvevent
quietly eststo: nbreg maoosvevent3 l1stateattack2   l1maoattack l1clash2     ib1.maocontordnew   cfire spaall xconstdum rebtroops_d secforcedis  l1maoosvevent3  i.distnum  , nolog irr vce(cluster dist)
est store _m6
esttab _m2 _m3 _m4 _m5 _m6  , eform se star(* 0.05 ** 0.01 *** 0.001)  label replace modelwidth(7) scalars(N_g)  order( )  drop(*distnum* *year*)    

*Appendix, table 3
*put lagged maoovevent (4 weeks) =0
 eststo: nbreg maoosvevent3 l1stateattack2   l1maoattack l1clash2     ib1.maocontordnew   cfire spaall xconstdum rebtroops_d secforcedis   i.distnum if maoosvevent34w==0, nolog irr vce(cluster dist)
est store _m7
*L2
 eststo: nbreg maoosvevent3 l2stateattack2   l2maoattack l2clash2     ib1.maocontordnew   cfire spaall xconstdum rebtroops_d secforcedis   i.distnum , nolog irr vce(cluster dist)
est store _m8
*L3
quietly eststo: nbreg maoosvevent3 l3stateattack2   l3maoattack l3clash2     ib1.maocontordnew   cfire spaall xconstdum rebtroops_d secforcedis   i.distnum , nolog irr vce(cluster dist)
est store _m9
*L4
quietly eststo: nbreg maoosvevent3 l4stateattack2   l4maoattack l4clash2     ib1.maocontordnew   cfire spaall xconstdum rebtroops_d secforcedis   i.distnum , nolog irr vce(cluster dist)
est store _m10
*L5
quietly eststo: nbreg maoosvevent3 l5stateattack2   l5maoattack l5clash2     ib1.maocontordnew   cfire spaall xconstdum rebtroops_d secforcedis   i.distnum , nolog irr vce(cluster dist)
est store _m11
*spatial lag
quietly eststo:  nbreg maoosvevent3 l1neigmaoosvevent3  l1stateattack2  l1maoattack l1clash2     ib1.maocontordnew   cfire spaall xconstdum rebtroops_d secforcedis i.distnum , nolog irr  vce(cluster dist)
est store _m12
*Appendix Tables 2 and 3
esttab _m7 _m8 _m9 _m10 _m11 _m12  , eform se star(* 0.05 ** 0.01 *** 0.001)  label replace modelwidth(7) scalars(N_g)  order( )  drop(*distnum* )    


